package com.lin.cms.domain;

import java.io.Serializable;

public class ContentPicture implements Serializable {

	private static final long serialVersionUID = 1L;

	private int contentId;

	private int priority;

	private String imgPath;

	private String description;

	public ContentPicture() {
	}

	public int getContentId() {
		return contentId;
	}

	public void setContentId(int contentId) {
		this.contentId = contentId;
	}

	public int getPriority() {
		return priority;
	}

	public void setPriority(int priority) {
		this.priority = priority;
	}

	public String getImgPath() {
		return imgPath;
	}

	public void setImgPath(String imgPath) {
		this.imgPath = imgPath;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + contentId;
		result = prime * result + priority;

		return result;
	}
	
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		final ContentPicture other = (ContentPicture) obj;
		if (contentId != other.contentId)
			return false;
		if (priority != other.priority)
			return false;

		return true;
	}
	
	@Override
	public String toString() {
		return getClass().getName() + "@" + Integer.toHexString(hashCode()) + 
			"(" + 
			"contentId=" + "'" + contentId + "'" + ", " + 
			"priority=" + "'" + priority + "'" + 
			")";
	}
	
}
